package com.sixth.statistics.controller;

import com.sixth.core.entity.OrderBackfee;
import com.sixth.core.vo.R;
import com.sixth.statistics.service.OrderBackFeeService;
import com.sixth.statistics.vo.OrderBackFeeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: six-hospital-system
 * @description: 退费管理控制器
 * @author: 朱永奇
 * @create: 2024-08-22 15:12
 **/
@Api(tags = "退费金额统计")
@RestController
@RequestMapping("/statistics/orderBackFee")
public class OrderBackFeeController {

    @Autowired
    private OrderBackFeeService orderBackFeeService;

    @ApiOperation(value = "获取退费总金额", notes = "根据传入的 OrderBackFeeVo 对象获取退费总金额列表")
    @PostMapping("/list")
    public R<List<OrderBackfee>> listR(@RequestBody OrderBackFeeVo orderBackFeeVo) {
        return orderBackFeeService.selectAllBack(orderBackFeeVo);
    }

    @ApiOperation(value = "获取退费详细类型", notes = "根据传入的 OrderBackFeeVo 对象获取退费详细类型列表")
    @PostMapping("/ListBack")
    public R<List<OrderBackfee>> list(@RequestBody OrderBackFeeVo orderBackFeeVo) {
        return orderBackFeeService.selectAllBackFee(orderBackFeeVo);
    }
}
